package com.love.marriage.userLoginInfo.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.love.marriage.common.vo.BaseVo;
import com.love.marriage.config.Long2StringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * description:  用户登录历史表Vo
 * author:       mybatisPlus
 * createDate:   2024-10-12 11:25:06
 * version:      1.0.0
 */
@Getter
@Setter
@Accessors(chain = true)
@Schema(name = "UserLoginInfoVo", description = "用户登录历史表Vo")
public class UserLoginInfoVo extends BaseVo<UserLoginInfoVo>{

    @JsonSerialize(using = Long2StringSerializer.class)
    @Schema(description = "用户id", type = "Long", implementation = Long.class)
    private Long userId;

    @Schema(description = "最后登录时间", type = "LocalDateTime", implementation = LocalDateTime.class)
    private LocalDateTime lastLoginTime;

    @Schema(description = "token在redis中对应的tokenId", type = "String", implementation = String.class)
    private String tokenId;

    @Schema(description = "系统", type = "String", implementation = String.class)
    private String os;

    @Schema(description = "登录浏览器", type = "String", implementation = String.class)
    private String broswer;

    @Schema(description = "最后登录IP", type = "String", implementation = String.class)
    private String loginIp;

    @JsonSerialize(using = Long2StringSerializer.class)
    @Schema(description = "修改人", type = "Long", implementation = Long.class)
    private Long updater;

    @Schema(description = "更新时间", type = "LocalDateTime", implementation = LocalDateTime.class)
    private LocalDateTime updateTime;

    @Schema(description = "token信息", type = "String", implementation = String.class)
    private String token;

    @Schema(description = "登录地址", type = "String", implementation = String.class)
    private String loginLocation;

    @Schema(description = "来源", type = "String", implementation = String.class)
    private String fromSource;

}
